A keyboard communicates user-entered data to an electronic device, such as a computer. When a user presses a key on the keyboard, the keyboard generates data representative of the particular key that was pressed (e.g., the ASCII code for the letter “e”), and this data is received by a component in the computer, such as a device driver. The device driver then presents the data to whatever program running on the computer is currently receiving input (e.g., by placing the data into the input buffer for whichever application program is active).
One problem that arises in using a keyboard to receive data is when the data is sensitive, or otherwise needs to be kept secret. For example, a secure application (or a secure service of an operating system) may ask the user to enter a password, which should not be generally divulged to the public at large. However, the path leading from the keyboard to the software component that will receive the data is not secure, since there are several opportunities to intercept the data. For example, the data will often travel on a bus that is subject to snooping, and will be handled by a device driver that may be subject to tampering (or that the operating system will allow to be replaced with a non-secure device driver that stores and divulges the information that the driver handles). In other words, there are several opportunities to observe or tamper with secret data on its way from the keyboard to its ultimate destination.
In general, it is possible to encrypt data for transmission between two components that are connected by a non-secure channel. However, many encryption techniques cannot easily be applied in the context of a keyboard, due to various factors, such as key management issues, the possibility of replay attacks, and the fact that the relatively small range of data that can be generated by a keyboard would make an ordinary cipher on keyboard communications relatively easy to break if a moderately-sized sample of ciphertext can be intercepted.
In view of the foregoing, there is a need for a technique that facilitates secure communication with a keyboard.